//
//  FFWalletManager.h
//  LLWallet
//
//  Created by tt on 2020/9/2.
//

#import <Foundation/Foundation.h>
#import <PromiseKit/PromiseKit.h>
NS_ASSUME_NONNULL_BEGIN

typedef enum : NSUInteger {
    LIMPayItemUnknown, // 未知
    LIMPayItemRedpacket, // 红包
    LIMPayItemTransfer, // 转账
    LIMPayItemWithdraw, // 提现
    LIMPayItemFreePWDRedpacket, // 红包免密
    LIMPayItemFreePWDTransfer, // 转账免密
    LIMPayItemFreePWDPayQRCodeOn, // 付款码开启
    LIMPayItemQRCodePay, // 二维码付款
} LIMPayItem; // 支付项目

@interface FFWalletManager : NSObject

+ (FFWalletManager *)shared;





/// 获取支付token
/// @param amount 支付金额
/// @param item 支付项
/// @param remark 支付备注
/// @param callback 支付回调
/// @param cancel 取消支付
-(void)ff_getPayToken:(NSInteger)amount item:(LIMPayItem)item remark:(NSString*)remark callback:(void(^)(NSString *payToken))callback cancel:(void(^_Nullable)(void))cancel;

-(void)ff_getPayToken:(NSInteger)amount item:(LIMPayItem)item remark:(NSString*)remark callback:(void(^)(NSString *payToken))callback;

-(void)ff_getPayToken:(NSString*)title remark:(NSString*)remark item:(LIMPayItem)item  callback:(void(^)(NSString *payToken))callback;



/// 直接请求服务器获取payToken
/// @param pwd <#pwd description#>
/// @param item <#item description#>
/// @param amount <#amount description#>
-(AnyPromise*) requestPayToken:(NSString*)pwd item:(LIMPayItem)item amount:(NSInteger)amount;

@end

NS_ASSUME_NONNULL_END
